package com.demo.mvc.config;

import com.demo.mvc.ioc.People004;
import com.demo.mvc.ioc.People006;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.ImportResource;

@Configuration
@ComponentScan(basePackages = {"com.demo.mvc.ioc"})
@ImportResource(locations = {"classpath:app-bean.xml"})
public class AppConfig {
  @Bean
  public People004 getPeople004(){
    return new People004();
  }

  @Bean(initMethod = "initP006")
  public People006 getPeople006(){
    return new People006();
  }
}
